import { v4 } from 'uuid';
import { useState } from 'react';

const useUuid = () => {
  const [uuid, setUuid] = useState(v4());
  const refresh = () => {
    setUuid(v4());
  };
  return [uuid, refresh] as const;
};

export default useUuid;
